--------------------------------------------------------
--  DDL for Trigger PCR_COMPONENT_PK_TRG
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "PCR_COMPONENT_PK_TRG" 
  BEFORE INSERT ON "PCR_COMPONENT"
  REFERENCING FOR EACH ROW
  begin  
 
      if :NEW."PCRCID" is null then 
         select PCR_SEQ.nextval into :NEW."PCRCID" from dual; 
      end if; 
      :NEW.OWNER        := v('APP_USER');
      :NEW.CREATE_DT    :=  sysdate;
      :NEW.LAST_MOD_DT  := sysdate;
      :NEW.DEL_FLAG_YN  :=  'N';
end;
ALTER TRIGGER "PCR_COMPONENT_PK_TRG" ENABLE
